import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Main from '@/pages/Main'

Vue.use(Router)

const router = new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld,
      redirect: '/main'   //重定向路径
    },
    {
      path: '/main',
      name: 'Main',
      component: Main
    },
  ]
})

export default router